<table class="layui-table text-center" lay-size="sm">
    <thead>
        <tr>
            <th><input type="checkbox" class="checked-all" target="producer-id"></th>
            <th>
                <div class="text-left">名称</div>
            </th>
            <th>编号</th>
            <th>类型</th>
            <th>主营商品</th>
            <th>付款方式</th>
            <th>账期天数</th>
            <th>网站</th>
            <th>开发票</th>
            <th>交货时间</th>
            <th>质量分数</th>
            <th>状态</th>
            <th>联系人</th>
            <!--<th>手机</th>
            <th>阿里旺旺</th>-->
            <th>共采购金额</th>
            <th>地址</th>
            <th>备注</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        {volist name="list" id="item"}
            <tr>
                <td><input type="checkbox" class="producer-id" name="producer_id[]" value="{$item.producer_id}"></td>
                <td class="text-left">{$item.name}</td>
                <td class="copy-text">{$item.code}</td>
                <td>{$item.type}</td>
                <td class="text-left">{$item.main_product}</td>
                <td class="text-left">{$item.pay_type}</td>
                <td class="text-left">{$item.credit_day} 天</td>
                <td>{if !empty($item.site)}<a target="_blank" href="{$item.site}"><i class="layui-icon layui-icon-link"></i></a>{/if}</td>
                <td>
                    <span class="{$item.is_invoice?'text-yellow':'text-muted'}"><i class="fa fa-circle"></i> {$item.is_invoice?'是':'否'}</span>
                </td>
                <td>{if $item.delivery_day>0}{$item.delivery_day} 天{/if}</td>
                <td>{$item.quality}</td>
                <td>
                    {php}$status = $item->getData('status');{/php}
                    <a href="{:url('save',['producer_id'=>$item['producer_id'], 'status'=>abs(1-$status)])}" class="ajax-get" msg="0" style="font-size: 16px;">
                        {$status?'<i class="fa fa-unlock"></i>':'<i class="fa fa-lock text-red"></i>'}</a>
                </td>
                <td class="text-left">{$item.contacts}</td>
                <!--<td>{$item.mobile}</td>
                <td>{$item.wangwang}</td>-->
                <td class="text-left">{$item.total_price|abs}</td>
                <td class="text-left">{$item.address}</td>
                <td class="text-left">{$item.remark}</td>
                <td><a href="{:url('add',['producer_id'=>$item['producer_id']])}" height-form="80%" class="layui-btn layui-btn-xs layui-btn-normal ajax-form" title="供应商">编辑</a>
                    <a href="{:url('delete',['ids'=>$item['producer_id']])}" title="删除" confirm="1" class="layui-btn layui-btn-xs layui-btn-danger ajax-get">删除</a> </td>
            </tr>
        {/volist}
        {empty name="list"}
        <tr>
            <td colspan="18">没有数据</td>
        </tr>
        {/empty}
    </tbody>
</table>
<div class="page">
    {$page|raw}
</div>